<?php
$this->load->helper('form');
$attributes = array('class' => 'addForm',
 					'id' => 'addForm');
?>

<script type="text/javascript">
<!-- Begin HTML comment that hides the script.
	window.addEvent('domready', function() { myCal = new Calendar({ released_date: 'd/m/Y' }); });
// End HTML comment that hides the script. -->
</script>

<div class="addForm">
	
	<h3>Add a game</h3>
	
	<?= form_open('games/addGame', $attributes); ?>
		<fieldset>
		
		
		<div class="row">
			<label for="console_id">Console:</label>				
			<?= form_dropdown('console_id', $consolesList); ?>
		</div>
		
		<div class="row">
			<label for="genre_id">Genre:</label>
			<?= form_dropdown('genre_id', $genresList); ?>
		</div>
		
		<div class="row">
			<label for='name'>Game name:</label>
			<input type="text" name="name" id="name" value="" maxlength="255" size="20" />
		</div>

		<div class="row">
			<label for='publisher'>Publisher:</label>
			<input type="text" name="publisher" id="publisher" value="" maxlength="255" size="20" />
		</div>
		
		<div class="row">
			<label for='released_date'>Released Date:</label>
			<input id="released_date" name="released_date" type="text" maxlength="255" size="20"  />
		</div>
		
		<div class="row">
			<label for='language'>Language:</label>
			<input type="text" name="language" id="language" value="" maxlength="100" size="20" />
		</div>

		<div class="row">
			<label for='player_number'>number of players:</label>
			<input type="text" name="player_number" id="player_number" value="" maxlength="100" size="20" />
		</div>

		<div class="row">
			<label for='format'>Format:</label>
			<input type="text" name="format" id="format" value="" maxlength="100" size="20" />
		</div>
		
		<?= form_submit('submit', 'Add Game', 'id="submit"'); ?>
		
		</fieldset>
	<?= form_close(); ?>
</div>
